{% extends "base.html" %}
{% block title %}氧化钙|创意编程社区{% endblock %}
{% block head %}
<link rel="stylesheet" href="static/css/base.css">


{% endblock %}
{% block body %}

<div class="main_body">

  <p>搜查结果</p>
  <div class="row" style="padding-bottom: 15px;margin-left: 0px;">
    {% for i in range(0, ProjectData|length) %}
    {% if i == 5%}
    <div class="card card-with cover_img" style="padding: 10px;">
    {% else %}
    <div class="card card-with cover_img" style="padding: 10px; margin-right: 10px;">
    {% endif %}
      <img src="{{ ProjectData[i].cover }}" class="cover_img" alt="作品封面" style="border-radius: 8px;">
      <div style="margin-top:5px">
        <img class="img-author" src="../static/scratch/static/avatar.png" alt="{{ ProjectData[i].author_name }}" width="15%">
        <div style="overflow:hidden;height: 40px;width: 80%;">
            <a style="white-space: nowrap;color:black;text-decoration: none;font-size: 15px;" href="/project/{{ ProjectData[i].id }}">{{ ProjectData[i].title }}</a>
            <h6 class="card-text" style="color: darkgray;font-size: 10px;">作者: {{ author[i] }}</h6>
        </div>
      </div>  
    </div>
    {% endfor %}
  </div>

          <br>
<hr  style="display: block;content: '';clear: both;" >
            <nav aria-label="Page navigation example">
              <ul class="pagination">
                <li class="page-item">
                  <a class="page-link" href="Search?key={{key}}&page=1" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                  </a>
                </li>
                {% for i in p.iter_pages() %}
                  {% if index == i%}
                  <li class="page-item active"><a class="page-link" href="Search?key={{key}}&page={{i}}">{{i}}</a></li>
                  {% else %}
                  <li class="page-item"><a class="page-link" href="Search?key={{key}}&page={{i}}">{{i}}</a></li>
                  {% endif %}
                {% endfor %}
                <li class="page-item">
                  <a class="page-link" href="Search?key={{key}}&page=-1" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                  </a>
                </li>
              </ul>
            </nav>

</div>
{% endblock %}